package com.java;

import java.util.Scanner;

public class Test1 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        //密码
        String ps = "1314520";
        int count = 3;
        while (count != 0) {
            System.out.println("还剩 " + count + " 次机会");
            count--;
            String str = scanner.nextLine();
            if (str.equals(ps) == true) {
                System.out.println("对了");
                return ;
            } else {
                System.out.println("不对");
            }
        }
    }
}
